package com.lemon.ai.socket.packets.spiritgame.model.generator;

public class DbcpPropertiesGenerator extends AbstractGenerator {

	public DbcpPropertiesGenerator() {
		super("DbcpPropertiesTemp.txt");
	}

	public String generate() {
		return super.temp.
				replace("DRIVER", super.prop.getProperty("driver")).
				replace("URL", super.prop.getProperty("url")).
				replace("USERNAME", super.prop.getProperty("username")).
				replace("PASSWORD", super.prop.getProperty("password"));
	}

	public String generateDbcpConfigName() {
		return super.prop.getProperty("dir") + "dbcpconfig.properties";
	}

	public static void main(String[] args) {
		DbcpPropertiesGenerator g = new DbcpPropertiesGenerator();
		System.out.println(g.generate());
	}

}
